﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class BadSphere : MonoBehaviour
{
    public float myZ;
    public EnvironmentController envCtrler;

    void Awake()
    {
        envCtrler = GameObject.Find("EnvironmentController").GetComponent<EnvironmentController>();
    }

    public void ResetBadSphere()
    {
        //Reset the badSphere's position
        Vector3 sampledPos = new Vector3((float)envCtrler.epm.GetPara(EP.badSpherePosX,true),
                                        (float)envCtrler.epm.GetPara(EP.badSpherePosY,true),
                                        myZ);
        transform.localPosition = sampledPos;

        //Reset the badSphere's scale
        transform.localScale = Vector3.one * (float)envCtrler.epm.GetPara(EP.badSphereScale,true);
    }
}
